using System;
using WPFCommon.Interface;

namespace WPFCommon.Logger
{
    public class RelayMessageLogger : IMessageLogger
    {
        public void Log(string message)
        {
            _loggingMethod?.Invoke(message);
        }

        private readonly Action<string> _loggingMethod;

        public RelayMessageLogger(Action<string> loggingMethod)
        {
            _loggingMethod = loggingMethod;
        }
    }
}